package com.woniu.service;

import com.woniu.adapter.EarningsAdapter;
import com.woniu.service.bean.AddEarnings;
import com.woniu.service.bean.AddEarningsHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Slf4j
@Transactional
public class EarningsService implements AddEarningsHandler {

    @Autowired
    private EarningsAdapter earningsAdapter;

    /**
     * 向收益表添加数据
     * @param command
     */
    @Override
    public void action(AddEarnings command) {
        earningsAdapter.addEarnings(command);
    }
}
